<template>
	<div class="layout-padding">
		<div class="layout-padding-auto layout-padding-view">
			<div class="flex flex-wrap gap-4 p-2">
				<entrance-item v-for="item in list" :key="item.id" :item="item" @click="formDialogRef.open(item)" />
			</div>
			<!-- 编辑、新增  -->
			<launch-form ref="formDialogRef" />
		</div>
	</div>
</template>

<script setup lang="ts" name="systemFlwProcess">
import { queryAllProcessList, IFlwProcessVO } from '@/api/oa/flwProcess';
import EntranceItem from './entranceItem.vue';

const LaunchForm = defineAsyncComponent(() => import('./launchForm.vue'));
const formDialogRef = ref();

const list = ref<IFlwProcessVO[]>([]);
function getList() {
	queryAllProcessList().then((res) => {
		list.value = res.data;
	});
}

onMounted(() => {
	getList();
});
</script>
